<!DOCTYPE html>
<html>
<head>
  <script src="https://static.geetest.com/v4/gt.js"></script>
</head>
<body>
  <div id="geetest-container"></div>
  <script>
    const params = new URLSearchParams(window.location.search);
    const gt = params.get('gee_gt');
    const challenge = params.get('gee_challenge');

    initGeetest({
      gt,
      challenge,
      product: 'float', // 嵌入式验证码
    }, (captcha) => {
      captcha.onSuccess(() => {
        const result = captcha.getValidate();
        window.parent.postMessage({
          geetest_validate: result.geetest_validate,
          geetest_seccode: result.geetest_seccode
        }, '*');
      });
    });
  </script>
</body>
</html>